//
//  FinanceAnnotation.m
//  Finance
//
//  Created by cheng xiang on 13-4-6.
//  Copyright (c) 2013年 cheng xiang. All rights reserved.
//

#import "FinanceAnnotation.h"

@implementation FinanceAnnotation
@synthesize financeDic = _financeDic, proArray = proArray;

+ (FinanceAnnotation *)annotationForFinance:(NSDictionary *)financeDic withProArray:(NSArray *)proArray
{
    FinanceAnnotation *annotation = [[FinanceAnnotation alloc] init];
    annotation.financeDic = financeDic;
    annotation.proArray = proArray;
    return annotation;
}

- (NSString *)title
{
    return (self.financeDic)[ANNOTATION_TITLE];
}

- (NSString *)subtitle
{
    return [self.financeDic valueForKeyPath:ANNOTATION_DESCRIPTION];
}

- (CLLocationCoordinate2D)coordinate
{
    CLLocationCoordinate2D coordinate;
    coordinate.latitude = [(self.financeDic)[LATITUDE] doubleValue];
    coordinate.longitude = [(self.financeDic)[LONGITUDE] doubleValue];
    return coordinate;
}
@end
